package com.FQJ.stock.mapper;

import com.FQJ.stock.pojo.domain.Stock4EvrDayDomain;
import com.FQJ.stock.pojo.domain.Stock4MinuteDomain;
import com.FQJ.stock.pojo.domain.StockUpdownDomain;
import com.FQJ.stock.pojo.entity.StockRtInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Entity com.FQJ.stock.pojo.entity.StockRtInfo
 */
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(@Param("record") StockRtInfo record);

	List<StockUpdownDomain> findAll(@Param("cur_time") Date lastDate);

	List<Map> getStockUpdownCount(@Param("openTime")Date openTime, @Param("curTime")Date curTime, @Param("i") int i);

	List<Map> getStockCount(@Param("curDate") Date curDate);

	List<Stock4MinuteDomain> getStockInfoByCodeAndDate(@Param("code") String code, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

	List<Stock4EvrDayDomain> getStockInfo4EvrDay(@Param("code") String code, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

	/**
	 * 批量插入
	 * @param list
	 */
	void insertBatch(@Param("lists") List list);
}
